package com.cn.web.controller.EM.wo_manage;

import com.alibaba.fastjson2.JSONObject;
import com.cn.bean.vo.EM.partRegt.BarkPar;
import com.cn.mapper.dao.db5.EM.wo_manage.WOPlanUninstallDao;
import com.cn.mapper.dao.db5.EM.wo_manage.WOReportInstallDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@Transactional
@RequestMapping("/PlanUninstall")
public class WOPlanUninstallController {
    private final WOPlanUninstallDao woPlanUninstallDao;

    @Autowired(required = false)
    public WOPlanUninstallController(WOPlanUninstallDao woPlanUninstallDao) {
        this.woPlanUninstallDao = woPlanUninstallDao;
    }
    @RequestMapping("/insert")
    @ResponseBody
    public BarkPar insert(@RequestBody JSONObject jsonObject){
        System.out.println("jsonObject:iiiiiiiiiiiiii" + jsonObject);


        return woPlanUninstallDao.insert(String.valueOf(jsonObject));

    }

    @RequestMapping("/getSing")
    @ResponseBody
    public String getSing(@RequestBody JSONObject jsonObject){
        System.out.println("jsonObject:getSSSSSSSS" + jsonObject);
        return woPlanUninstallDao.getSing(String.valueOf(jsonObject));
    }

    @RequestMapping("/getList")
    @ResponseBody
    public String getList(@RequestBody JSONObject jsonObject)  {
        System.out.println("jsonObject:LISTTTTTTTTT" + jsonObject);
        String list = woPlanUninstallDao.getList(String.valueOf(jsonObject));
        System.out.println("xxxxxxxxxxxxxx:"+list);
        return list;
    }
    @RequestMapping("/getRack")
    @ResponseBody
    public String getRack(@RequestBody JSONObject jsonObject)  {
        System.out.println("jsonObject:rrrrrrrrrr" + jsonObject);
        String list = woPlanUninstallDao.getRack(String.valueOf(jsonObject));
        System.out.println("xxxxxxxxaaxxxxxx:"+list);
        return list;
    }
    @RequestMapping("/getInfo")
    @ResponseBody
    public String getInfo(@RequestBody JSONObject jsonObject)  {
        System.out.println("jsonObject:fffffffff" + jsonObject);
        String list = woPlanUninstallDao.getInfo(String.valueOf(jsonObject));
        System.out.println("assxxxxxxxxxx:"+list);
        return list;
    }
    @RequestMapping("/stateUp")
    @ResponseBody
    public BarkPar stateUp(@RequestBody JSONObject jsonObject)  {
        System.out.println("jsonObject:ppppppp" + jsonObject);

        return woPlanUninstallDao.stateUp(String.valueOf(jsonObject));
    }
}
